import React from "react";
import { Route, Switch, useRouteMatch } from "react-router-dom";
import CustomerServiceList from "../index";
import CustomerServiceChat from "../chat";

const CustomerServiceMessages = () => {
  const { path } = useRouteMatch();

  return (
    <div>
      <h1>客服消息</h1>
      <Switch>
        <Route exact path={path} component={CustomerServiceList} />
        <Route path={`${path}/chat/:userId`} component={CustomerServiceChat} />
      </Switch>
    </div>
  );
};

export default CustomerServiceMessages;
